<include file="Public/siteTopbar" />
    <link rel="stylesheet" href="__STATIC__/css/security_set.css">
    <link rel="stylesheet" href="__STATIC__/css/btn.css">
    <script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__STATIC__/js/slider.js"></script>
<link rel="stylesheet" href="__STATIC__/css/user.css" type="text/css">
<include file="Public/header" />


<div class="container logintop">
<h3>My Account</h3>
<p>My Account allows you to manage your setting and preferences. Existing wish list or project portfolio logins can be used to login to My Account.</p>
</div>



<div class="container usercenter">
    <div class="col-sm-6">
        <div class="longinBox">
            <h3>- Set Password -</h3>
                <ul class="form-list">

		<form action="" id="vi_form" method="post">
                    <li>
                         <label for="email" class="required"><em>*</em>Password:</label>
                         <input  name="password" id="password" type="password" class="loginInput required-entry validate-email" onblur="checkpwd()">  
                    </li>
                    
                    
                    <li>
                         <label for="email" class="required"><em>*</em>Confirm Password:</label>
                         <input  name="password2" id="password_repeat" type="password" class="loginInput required-entry validate-email" onblur="checkpwd()">  
                    </li>
                    
                    
                    
                 
                    <li>
                        <button type="button" class="loginbutton"   onClick="dosubmit()"  ><span><span>Next step</span></span></button>
                    </li>
                    </form>
                </ul>
        </div>
    </div>
    
    
	<include file="forpass_public" />

</div>




<include file="Public/footer" />
<script>
var flag1 = flag2 = false;
function checkpwd(){
	var password = $('#password').val();
	var password_repeat = $('#password_repeat').val();

	if(password == ''){
				layer.msg('Password can not be blank', {
					icon: 1,  
					time: 2000 
				});
		return false;
	}else if(password.length<6 || password.length>16){
		
				layer.msg('The password length must be 6-16 digits', {
					icon: 1,  
					time: 2000 
				});
		return false;
	}else{
		//$('span[data-tips-for="password"]').css('display','inline');
		//$('span[data-tips-for="password"]').find('i').removeClass('icon-warn');
		//$('span[data-tips-for="password"]').find('i').addClass('icon-loss');
		//$('span[data-tips-for="password"]').find('.txt').empty();
		flag1 = true;
	}
	
	if(password_repeat == ''){
				layer.msg('Repeat password can not be empty', {
					icon: 1,  
					time: 2000 
				});
		return false;
	}else if(password!=password_repeat){
				layer.msg('The password is different twice', {
					icon: 1,  
					time: 2000 
				});
		return false;
	}else{
		//$('span[data-tips-for="password_repeat"]').css('display','inline');
		//$('span[data-tips-for="password_repeat"]').find('i').removeClass('icon-warn');
		//$('span[data-tips-for="password_repeat"]').find('i').addClass('icon-loss');
		//$('span[data-tips-for="password_repeat"]').find('.txt').empty();
		flag2 = true;
	}
	return (flag1 && flag2);
}

function show_error(type,msg){
	//$('span[data-tips-for="'+type+'"]').css('display','inline');
	//$('span[data-tips-for="'+type+'"]').find('i').removeClass('icon');
	//$('span[data-tips-for="'+type+'"]').find('i').removeClass('icon-loss');
	//$('span[data-tips-for="'+type+'"]').find('i').addClass('icon-warn');
	//$('span[data-tips-for="'+type+'"]').find('.txt').empty().html(msg);
}

function dosubmit(){
	if(checkpwd()){
		$('#vi_form').submit();
	}
}
</script>
</body>
</html>	